package com.example.demo.mapper;

import com.example.demo.entity.collect;
import com.example.demo.entity.favorite;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface collectMapper {
    //查询收藏夹根据邮箱
    public List<favorite> selectfavoriteBymailbox(String mailbox);
    //查询收藏根据收藏夹id
    public List<collect> selectcollectByfavoritrid(int favoriteid);
    //新建收藏夹
    public void insertfavorite(favorite favorite);
    //删除收藏夹
    public void deletefavorite(int id);
    //删除收藏夹的同时删除收藏夹的blog
    public void delectcollectbyfavoriteid(int favoriteid );
    //删除收藏根据id
    public void delectcollectbyid(int id);
    //创建收藏
    public void insertcollect(collect collect);
    //修改收藏夹
    public void updatefavorite(favorite favorite);
}
